import javax.swing.JComponent;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;

public class ThreeDButtonComponent extends JComponent
{
   public void paintComponent(Graphics g)
   {
     Graphics2D g2 = (Graphics2D) g;
     Color pink = Color.pink;
      Color brighterpink = pink.brighter();
      Color darkerpink = pink.darker();
      g2.setColor(pink);
      g2.fillRect(50,50,100,100);
      g2.setColor(brighterpink);
      g2.fillRect(48,48,2,102);
      g2.setColor(brighterpink);
      g2.fillRect(48,48,102,2);
      g2.setColor(darkerpink);
      g2.fillRect(48,150,102,2);
      g2.setColor(darkerpink);
      g2.fillRect(150,48,2,104);
   }
}